{"ast":null,"code":"import React from\"react\";import{Link}from\"react-router-dom\";import'./ToggleItem.scss';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var ToggleItem=function ToggleItem(props){if(props.link){return/*#__PURE__*/_jsxs(Link,{className:\"toggle-item\",to:props.link,children:[/*#__PURE__*/_jsx(\"div\",{className:\"toggle-item-icon\",style:{backgroundImage:\"url(\".concat(props.svgUrl,\")\")}}),/*#__PURE__*/_jsx(\"span\",{className:\"toggle-item-name\",children:props.name})]});}else{return/*#__PURE__*/_jsxs(\"div\",{className:\"toggle-item\",onClick:props.onClick&&props.onClick,children:[/*#__PURE__*/_jsx(\"div\",{className:\"toggle-item-icon\",style:{backgroundImage:\"url(\".concat(props.svgUrl,\")\")}}),/*#__PURE__*/_jsx(\"span\",{className:\"toggle-item-name\",children:props.name})]});}};export default ToggleItem;","map":{"version":3,"names":["React","Link","ToggleItem","props","link","backgroundImage","svgUrl","name","onClick"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/src/components/ToggleItem/index.tsx"],"sourcesContent":["import React from \"react\";\nimport {ToggleProps} from \"../../models/props/ToggleProps\";\nimport {Link} from \"react-router-dom\";\nimport './ToggleItem.scss';\n\nconst ToggleItem: React.FC<ToggleProps> = (props) => {\n    if (props.link) {\n        return (\n            <Link className=\"toggle-item\" to={props.link}>\n                <div className=\"toggle-item-icon\" style={{backgroundImage: `url(${props.svgUrl})`}} />\n                <span className=\"toggle-item-name\">{props.name}</span>\n            </Link>\n        );\n    } else {\n        return (\n            <div className=\"toggle-item\" onClick={props.onClick && props.onClick}>\n                <div className=\"toggle-item-icon\" style={{backgroundImage: `url(${props.svgUrl})`}}/>\n                <span className=\"toggle-item-name\">{props.name}</span>\n            </div>\n        );\n    }\n}\n\nexport default ToggleItem;"],"mappings":"AAAA,MAAOA,MAAK,KAAM,OAAO,CAEzB,OAAQC,IAAI,KAAO,kBAAkB,CACrC,MAAO,mBAAmB,CAAC,wFAE3B,GAAMC,WAAiC,CAAG,QAApCA,WAAiC,CAAIC,KAAK,CAAK,CACjD,GAAIA,KAAK,CAACC,IAAI,CAAE,CACZ,mBACI,MAAC,IAAI,EAAC,SAAS,CAAC,aAAa,CAAC,EAAE,CAAED,KAAK,CAACC,IAAK,wBACzC,YAAK,SAAS,CAAC,kBAAkB,CAAC,KAAK,CAAE,CAACC,eAAe,eAASF,KAAK,CAACG,MAAM,KAAG,CAAE,EAAG,cACtF,aAAM,SAAS,CAAC,kBAAkB,UAAEH,KAAK,CAACI,IAAI,EAAQ,GACnD,CAEf,CAAC,IAAM,CACH,mBACI,aAAK,SAAS,CAAC,aAAa,CAAC,OAAO,CAAEJ,KAAK,CAACK,OAAO,EAAIL,KAAK,CAACK,OAAQ,wBACjE,YAAK,SAAS,CAAC,kBAAkB,CAAC,KAAK,CAAE,CAACH,eAAe,eAASF,KAAK,CAACG,MAAM,KAAG,CAAE,EAAE,cACrF,aAAM,SAAS,CAAC,kBAAkB,UAAEH,KAAK,CAACI,IAAI,EAAQ,GACpD,CAEd,CACJ,CAAC,CAED,cAAeL,WAAU"},"metadata":{},"sourceType":"module"}